﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;

namespace TEMS
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            for (int i = 1; i <= 5; i++)
            {
                WaitWin.Show("启动等待中，第 " + i + " 秒");
                Thread.Sleep(1000);
            }
            WaitWin.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Common.ShowProcessing("正在处理中，请稍候...", this, (obj) =>
            {
                //这里写处理耗时的代码，代码处理完成则自动关闭该窗口
                System.Threading.Thread.Sleep(10000);
            }, null);
        }
    }
}
